const dbPool = require("../database");

exports.getTypeList = function (req, res) {
  const sqlStr = "select * from type";
  dbPool.query(sqlStr, (err, results) => {
    if (err) return res.cc(err);
    res.send({
      status: 1,
      message: "获取商品分类成功！",
      data: results,
    });
  });
}